package com.leadingsoft.pwxk.enums;

public enum OperationLogType {
	IMPORT_DATA(
			"importData",
			"导入核发计划"),
	ADD_ANN(
			"addAnn",
			"新增通知公告"),
	EDIT_ANN(
			"editAnn",
			"更新通知公告"),
	DEL_ANN(
			"delAnn",
			"删除通知公告");
	private String val;
	private String desc;

	OperationLogType(String val, String desc) {
		this.val = val;
		this.desc = desc;
	}

	public String getVal() {
		return val;
	}

	public void setVal(String val) {
		this.val = val;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public static String getDescByVal(String val) {
		for (OperationLogType e : OperationLogType.values()) {
			if (e.getVal().equals(val)) {
				return e.getDesc();
			}
		}
		return null;
	}
}
